home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / extra / strupper.c < prev    next >
C/C++ Source or Header  |  1997-09-09  |  443b  |  30 lines

  1.  
  2. /*
  3.  *  Convert string to upper case
  4.  *
  5.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  6.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  7.  *    DICE-LICENSE.TXT.
  8.  */
  9.  
  10. #ifndef HYPER
  11. #define HYPER(x) x
  12. #endif
  13.  
  14. char *
  15. HYPER(strupper)(str)
  16. char *str;
  17. {
  18.     char c;
  19.     char *base = str;
  20.  
  21.     while (c = *str) {
  22.     if (c >= 'a' && c <= 'z')
  23.         *str = c + ('A' - 'a');
  24.     ++str;
  25.     }
  26.     return(base);
  27. }
  28.  
  29.  
  30.